Repository navigation
fix(process): match Node property descriptors - #102
Merged
Merged
Conversation
Expose Node-compatible data descriptors for process metadata and lazy argument arrays. Read replaced argv values through the public property in native consumers and keep dynamic title and parent PID behavior behind native data descriptors. Ports the argv portion of oven-sh#44356 and metadata attributes from oven-sh#34229.
Use a strict Function constructor for readonly writes and execute the native argv reader fixture as a script, matching the Node 24 controls. Scope the compatibility note to the measured metadata properties.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Process properties now expose Node-compatible descriptors, so code can preserve a descriptor while replacing its value:
Bun previously exposed
argvas an accessor, making this valid Node pattern throw before the property could be changed.argvandexecArgvnow materialize as lazy data properties; native consumers read the public property instead of a separate stale cache. This also preserves throwing getters and makes the inspector check the replacement's type before treating it as an array.The Node 24 comparison covered
platform,arch,version,versions,env,execPath,argv,pid,ppid,title,exitCode,release, and the siblingexecArgv. Six metadata properties now have Node's read-only flag while remaining configurable.ppidandtitleretain live native behavior behind data descriptors.env,execPath, andexitCodealready matched.Ports the argv portion of oven-sh/bun#44356 and the relevant metadata attributes from oven-sh/bun#34229; both remain open. Thanks @robobun. The unrelated environment-map changes are not included, and this requires no WebKit changes.
Validation on one dedicated Linux host:
parseArgs()reads after descriptor replacement and throwing getters.affb994cf4193ff967b0f792b4634435d3942948,extension-install-external.test.ts,extension-windows-host.test.ts, andbrowser-cli-extension.windows-setup.test.tspass 43/43 on Node 24 and patched Bun; c999 passes 15 and fails 28. Bun runs setOPENCLAW_VITEST_RUNTIME=bun, private HOME/state/TMPDIR, and umask 022.33eec2f6d4142b134edcee549defdf1ca86bed27passes 1,094 surrounding tests (six existing skips), both dependency-free oracles, and all four OpenClaw consumer files (48/48).The fork changelog is append-only. Linux x64 and macOS arm64 CI both passed on exact head
33eec2f6d4142b134edcee549defdf1ca86bed27; format and JavaScript lint also passed. The optional Claude workflow fails at credential validation before analysis (existing fork setup issue).